home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / text / mac / faqs.004 < prev    next >
Encoding:
Text File  |  1996-02-12  |  27.7 KB  |  633 lines

  1. Frequently Asked Questions (FAQS);faqs.004
  2.  
  3.  
  4.  
  5. Questions which this document addresses:
  6.  
  7. Q.1 What are alt.security and comp.security.misc for?
  8. Q.2 Whats the difference between a hacker and a cracker?
  9. Q.3 What is "security through obscurity"
  10. Q.4 What makes a system insecure?
  11. Q.5 What tools are there to aid security?
  12. Q.6 Isn't it dangerous to give cracking tools to everyone?
  13. Q.7 Where can I get these tools?
  14. Q.8 Why and how do systems get broken into?
  15. Q.9 Who can I contact if I get broken into?
  16. Q.10 What is a firewall?
  17. Q.11 Why shouldn't I use setuid shell scripts?
  18. Q.12 Why shouldn't I leave "root" permanently logged on the console?
  19. Q.13 Why shouldn't I create Unix accounts with null passwords?
  20. Q.14 What security holes are associated with X-windows (and other WMs)?
  21. Q.15 What security holes are associated with NFS?
  22. Q.16 How can I generate safe passwords?
  23. Q.17 Why are passwords so important?
  24. Q.18 How many possible passwords are there?
  25. Q.19 Where can I get more information?
  26. Q.20 How silly can people get?
  27.  
  28. ---------------------------------------------------------------------------
  29.  
  30. Q.1 What are alt.security and comp.security.misc for?
  31.  
  32. Comp.security.misc is a forum for the discussion of computer security,
  33. especially those relating to Unix (and Unix like) operating systems.
  34. Alt.security used to be the main newsgroup covering this topic, as well
  35. as other issues such as car locks and alarm systems, but with the
  36. creation of comp.security.misc, this may change.
  37.  
  38. This FAQ will concentrate wholly upon computer related security issues.
  39.  
  40. The discussions posted range from the likes of "What's such-and-such
  41. system like?" and "What is the best software I can use to do so-and-so"
  42. to "How shall we fix this particular bug?", although there is often a
  43. low signal to noise ratio in the newsgroup (a problem which this FAQ
  44. hopes to address).
  45.  
  46. The most common flamewars start when an apparent security novice posts a
  47. message saying "Can someone explain how the such-and-such security hole
  48. works?" and s/he is immediately leapt upon by a group of self appointed
  49. people who crucify the person for asking such an "unsound" question in a
  50. public place, and flame him/her for "obviously" being a cr/hacker.
  51.  
  52. Please remember that grilling someone over a high flame on the grounds
  53. that they are "a possible cr/hacker" does nothing more than generate a
  54. lot of bad feeling.  If computer security issues are to be dealt with in
  55. an effective manner, the campaigns must be brought (to a large extent)
  56. into the open.
  57.  
  58. Implementing computer security can turn ordinary people into rampaging
  59. paranoiacs, unable to act reasonably when faced with a new situation.
  60. Such people take an adversarial attitude to the rest of the human race,
  61. and if someone like this is in charge of a system, users will rapidly
  62. find their machine becoming more restrictive and less friendly (fun?) to
  63. use.
  64.  
  65. This can lead to embarrasing situations, eg: (in one university) banning
  66. a head of department from the college mainframe for using a network
  67. utility that he wasn't expected to.  This apparently required a lot of
  68. explaining to an unsympathetic committee to get sorted out.
  69.  
  70. A more sensible approach is to secure a system according to its needs,
  71. and if its needs are great enough, isolate it completely.  Please, don't
  72. lose your sanity to the cause of computer security; it's not worth it.
  73.  
  74. Q.2 What's the difference between a hacker and a cracker?
  75.  
  76. Lets get this question out of the way right now:
  77.  
  78. On USENET, calling someone a "cracker" is an unambiguous statement that
  79. some person persistently gets his/her kicks from breaking from into
  80. other peoples computer systems, for a variety of reasons.  S/He may pose
  81. some weak justification for doing this, usually along the lines of
  82. "because it's possible", but most probably does it for the "buzz" of
  83. doing something which is illicit/illegal, and to gain status amongst a
  84. peer group.
  85.  
  86. Particularly antisocial crackers have a vandalistic streak, and delete
  87. filestores, crash machines, and trash running processes in pursuit of
  88. their "kicks".
  89.  
  90. The term is also widely used to describe a person who breaks copy
  91. protection software in microcomputer applications software in order to
  92. keep or distribute free copies.
  93.  
  94. On USENET, calling someone a "hacker" is usually a statement that said
  95. person holds a great deal of knowledge and expertise in the field of
  96. computing, and is someone who is capable of exercising this expertise
  97. with great finesse.  For a more detailed definition, readers are
  98. referred to the Jargon File [Raymond].
  99.  
  100. In the "real world", various media people have taken the word "hacker"
  101. and coerced it into meaning the same as "cracker" - this usage
  102. occasionally appears on USENET, with disastrous and confusing results.
  103.  
  104. Posters to the security newsgroups should note that they currently risk
  105. a great deal of flamage if they use the word "hacker" in place of
  106. "cracker" in their articles.
  107.  
  108. NB: nowhere in the above do I say that crackers cannot be true hackers.
  109. It's just that I don't say that they are...
  110.  
  111. Q.3 What is "security through obscurity"
  112.  
  113. Security Through Obscurity (STO) is the belief that a system of any sort
  114. can be secure so long as nobody outside of its implementation group is
  115. allowed to find out anything about its internal mechanisms.  Hiding
  116. account passwords in binary files or scripts with the presumption that
  117. "nobody will ever find it" is a prime case of STO.
  118.  
  119. STO is a philosophy favoured by many bureaucratic agencies (military,
  120. governmental, and industrial), and it used to be a major method of
  121. providing "pseudosecurity" in computing systems.
  122.  
  123. Its usefulness has declined in the computing world with the rise of open
  124. systems, networking, greater understanding of programming techniques, as
  125. well as the increase in computing power available to the average person.
  126.  
  127. The basis of STO has always been to run your system on a "need to know"
  128. basis.  If a person doesn't know how to do something which could impact
  129. system security, then s/he isn't dangerous.
  130.  
  131. Admittedly, this is sound in theory, but it can tie you into trusting a
  132. small group of people for as long as they live.  If your employees get
  133. an offer of better pay from somewhere else, the knowledge goes with
  134. them, whether the knowledge is replaceable or not.  Once the secret gets
  135. out, that is the end of your security.
  136.  
  137. Nowadays there is also a greater need for the ordinary user to know
  138. details of how your system works than ever before, and STO falls down a
  139. as a result.  Many users today have advanced knowledge of how their
  140. operating system works, and because of their experience will be able to
  141. guess at the bits of knowledge that they didn't "need to know".  This
  142. bypasses the whole basis of STO, and makes your security useless.
  143.  
  144. Hence there is now a need is to to create systems which attempt to be
  145. algorithmically secure (Kerberos, Secure RPC), rather than just
  146. philosophically secure.  So long as your starting criteria can be met,
  147. your system is LOGICALLY secure.
  148.  
  149. "Shadow Passwords" (below) are sometimes dismissed as STO, but this is
  150. incorrect, since (strictly) STO depends on restricting access to an
  151. algorithm or technique, whereas shadow passwords provide security by
  152. restricting access to vital data.
  153.  
  154. Q.4 What makes a system insecure?
  155.  
  156. Switching it on.  The adage usually quoted runs along these lines:
  157.  
  158.  "The only system which is truly secure is one which is switched off
  159.  and unplugged, locked in a titanium lined safe, buried in a concrete
  160.  bunker, and is surrounded by nerve gas and very highly paid armed
  161.  guards.  Even then, I wouldn't stake my life on it."
  162.  
  163. (the original version of this is attributed to Gene Spafford)
  164.  
  165. A system is only as secure as the people who can get at it.  It can be
  166. "totally" secure without any protection at all, so long as its continued
  167. good operation is important to everyone who can get at it, assuming all
  168. those people are responsible, and regular backups are made in case of
  169. hardware problems.  Many laboratory PC's quite merrily tick away the
  170. hours like this.
  171.  
  172. The problems arise when a need (such as confidentiality) has to be
  173. fulfilled.  Once you start putting the locks on a system, it is fairly
  174. likely that you will never stop.
  175.  
  176. Security holes manifest themselves in (broadly) four ways:
  177.  
  178. 1) Physical Security Holes.
  179.  
  180. - Where the potential problem is caused by giving unauthorised persons
  181. physical access to the machine, where this might allow them to perform
  182. things that they shouldn't be able to do.
  183.  
  184. A good example of this would be a public workstation room where it would
  185. be trivial for a user to reboot a machine into single-user mode and muck
  186. around with the workstation filestore, if precautions are not taken.
  187.  
  188. Another example of this is the need to restrict access to confidential
  189. backup tapes, which may (otherwise) be read by any user with access to
  190. the tapes and a tape drive, whether they are meant to have permission or
  191. not.
  192.  
  193. 2) Software Security Holes
  194.  
  195. - Where the problem is caused by badly written items of "privledged"
  196. software (daemons, cronjobs) which can be compromised into doing things
  197. which they shouldn't oughta.
  198.  
  199. The most famous example of this is the "sendmail debug" hole (see
  200. bibliography) which would enable a cracker to bootstrap a "root" shell.
  201. This could be used to delete your filestore, create a new account, copy
  202. your password file, anything.
  203.  
  204. (Contrary to popular opinion, crack attacks via sendmail were not just
  205. restricted to the infamous "Internet Worm" - any cracker could do this
  206. by using "telnet" to port 25 on the target machine.  The story behind a
  207. similar hole (this time in EMACS) is described in [Stoll].)
  208.  
  209. New holes like this appear all the time, and your best hopes are to:
  210.  
  211.   a: try to structure your system so that as little software as possible
  212.   runs with root/daemon/bin privileges, and that which does is known to
  213.   be robust.
  214.  
  215.   b: subscribe to a mailing list which can get details of problems
  216.   and/or fixes out to you as quickly as possible, and then ACT when you
  217.   receive information.
  218.  
  219. 3) Incompatible Usage Security Holes
  220.  
  221. - Where, through lack of experience, or no fault of his/her own, the
  222. System Manager assembles a combination of hardware and software which
  223. when used as a system is seriously flawed from a security point of view.
  224. It is the incompatibility of trying to do two unconnected but useful
  225. things which creates the security hole.
  226.  
  227. Problems like this are a pain to find once a system is set up and
  228. running, so it is better to build your system with them in mind.  It's
  229. never too late to have a rethink, though.
  230.  
  231. Some examples are detailed below; let's not go into them here, it would
  232. only spoil the surprise.
  233.  
  234. 4) Choosing a suitable security philosophy and maintaining it.
  235.  
  236. >From: Gene Spafford <spaf@cs.purdue.edu>
  237. >The fourth kind of security problem is one of perception and
  238. >understanding.  Perfect software, protected hardware, and compatible
  239. >components don't work unless you have selected an appropriate security
  240. >policy and turned on the parts of your system that enforce it.  Having
  241. >the best password mechanism in the world is worthless if your users
  242. >think that their login name backwards is a good password! Security is
  243. >relative to a policy (or set of policies) and the operation of a system
  244. >in conformance with that policy.
  245.  
  246. Q.5 What tools are there to aid security?
  247.  
  248. 1) "COPS"
  249.  
  250. Managed by Dan Farmer, this is a long established suite of shell scripts
  251. which forms an extensive security testing system; There is a rudimentary
  252. password cracker, and routines to check the filestore for suspicious
  253. changes in setuid programs, others to check permissions of essential
  254. system and user files, and still more to see whether any system software
  255. behaves in a way which could cause problems.
  256.  
  257. The software comes in two versions - one written in Perl and one
  258. (largely equivalent) written in shell scripts.  The latest version is
  259. very up-to-date on Unix Security holes.
  260.  
  261. 2) "Crack" (+ "UFC").
  262.  
  263. Written by Alec Muffett, this is a program written with one purpose in
  264. mind: to break insecure passwords.  It is probably the most efficent and
  265. friendly password cracker that is publically available, with the ability
  266. to let the user to specify precisely how to form the words to use as
  267. guesses at users passwords.
  268.  
  269. It also has an inbuilt networking capability, allowing the load of
  270. cracking to be spread over as many machines as are available on a
  271. network, and it is supplied with an optimised version of the Unix crypt()
  272. algorithm.
  273.  
  274. An even faster version of the crypt() algorithm, "UFC" by Michael Glad,
  275. is freely available on the network, and the latest versions of UFC and
  276. Crack are compatible and can be easily hooked together.
  277.  
  278. 3) NPasswd (Clyde Hoover) & Passwd+ (Matt Bishop)
  279.  
  280. These programs are written to redress the balance in the password
  281. cracking war.  They provide replacements for the standard "passwd"
  282. command, but prevent a user from selecting passwords which are easily
  283. compromised by programs like Crack.
  284.  
  285. Several versions of these programs are available on the network, hacked
  286. about to varying degrees in order to provide compatibility for System V
  287. based systems, NIS/YP, shadow password schemes, etc.  The usual term for
  288. this type of program is a 'fascist' password program.
  289.  
  290. 4) "Shadow" - a Shadow Password Suite
  291.  
  292. This program suite (by John F Haugh II) is a set of program and function
  293. replacements (compatible with most Unixes) which implements shadow
  294. passwords, ie: a system where the plaintext of the password file is
  295. hidden from all users except root, hopefully stopping all password
  296. cracking attempts at source.  In combination with a fascist passwd
  297. frontend, it should provide a good degree of password file robustness.
  298.  
  299. >From: jfh@rpp386.lonestar.org (John F. Haugh II)
  300. >Shadow does much more than hide passwords.  It also provides for
  301. >terminal access control, user and group administration, and a few
  302. >other things which I've forgotten.  There are a dozen or more
  303. >commands in the suite, plus a whole slew of library functions.
  304.  
  305. 5) TCP Wrappers (Wietse Venema)
  306.  
  307. These are programs which provide a front-end filter to many of the
  308. network services which Unix provides by default.  If installed, they can
  309. curb otherwise unrestricted access to potential dangers like incoming
  310. FTP/TFTP, Telnet, etc, and can provide extra logging information, which
  311. may be of use if it appears that someone is trying to break in.
  312.  
  313. 6) SecureLib
  314.  
  315. >From: phil@pex.eecs.nwu.edu (William LeFebvre)
  316. >You may want to add a mention of securelib, a security enhancer
  317. >available for SunOS version 4.1 and higher.
  318.  
  319. >Securelib contains replacement routines for three kernel calls:
  320. >accept(), recvfrom(), recvmsg().  These replacements are compatible with
  321. >the originals, with the additional functionality that they check the
  322. >Internet address of the machine initiating the connection to make sure
  323. >that it is "allowed" to connect.  A configuration file defines what
  324. >hosts are allowed for a given program.  Once these replacement routines
  325. >are compiled, they can be used when building a new shared libc library.
  326. >The resulting libc.so can then be put in a special place.  Any program
  327. >that should be protected can then be started with an alternate
  328. >LD_LIBRARY_PATH.
  329.  
  330. 7) SPI
  331.  
  332. >From: Gene Spafford <spaf@cs.purdue.edu>
  333. >Sites connected with the Department of Energy and some military
  334. >organizations may also have access to the SPI package.  Interested (and
  335. >qualified) users should contact the CIAC at LLNL for details.
  336.  
  337. >SPI is a screen-based administrator's tool that checks configuration
  338. >options, includes a file-change (integrity) checker to monitor for
  339. >backdoors and viruses, and various other security checks.  Future
  340. >versions will probably integrate COPS into the package.  It is not
  341. >available to the general public, but it is available to US Dept of
  342. >Energy contractors and sites and to some US military sites.  A version
  343. >does or will exist for VMS, too.  Further information on availabilty can
  344. >be had from the folks at the DoE CIAC.
  345.  
  346. Q.6 Isn't it dangerous to give cracking tools to everyone?
  347.  
  348. That depends on your point of view.  Some people have complained that
  349. giving unrestricted public access to programs like COPS and Crack is
  350. irresponsible because the "baddies" can get at them easily.
  351.  
  352. Alternatively, you may believe that the really bad "baddies" have had
  353. programs like this for years, and that it's really a stupendously good
  354. idea to give these programs to the good guys too, so that they may check
  355. the integrity of their system before the baddies get to them.
  356.  
  357. So, who wins more from having these programs freely available? The good
  358. guys or the bad ? You decide, but remember that less honest tools than
  359. COPS and Crack tools were already out there, and most of the good guys
  360. didn't have anything to help.
  361.  
  362. Q.7 Where can I get these tools?
  363.  
  364. COPS:
  365.  
  366.   V1.04, available for FTP from cert.sei.cmu.edu in pub/cops and
  367.   archive.cis.ohio-state.edu in pub/cops.
  368.  
  369. Crack/UFC:
  370.  
  371.   Crack v4.1f and UFC Patchlevel 1.  Available from any major USENET
  372.   archive (eg: ftp.uu.net) in volume 28 of comp.sources.misc.
  373.  
  374. NPasswd:
  375.  
  376.   Currently suffering from being hacked about by many different people.
  377.   Version 2.0 is in the offing, but many versions exist in many
  378.   different configurations. Will chase this up with authors - AEM
  379.  
  380. Passwd+:
  381.  
  382.   "alpha version, update 3" - beta version due soon.  Available from
  383.   dartmouth.edu as pub/passwd+.tar.Z
  384.  
  385. Shadow:
  386.  
  387.   This is available from the comp.sources.misc directory at any major
  388.   USENET archive (see entry for Crack)
  389.  
  390. TCP Wrappers:
  391.  
  392.   Available for anonymous FTP:
  393.  
  394.     cert.sei.cmu.edu: pub/network_tools/tcp_wrapper.shar
  395.     ftp.win.tue.nl: pub/security/log_tcp.shar.Z
  396.  
  397. Securelib:
  398.  
  399.   The latest version of securelib is available via anonymous FTP from the
  400.   host "eecs.nwu.edu".  It is stored in the file "pub/securelib.tar".
  401.  
  402. Q.8 Why and how do systems get broken into?
  403.  
  404. This is hard to answer definitively.  Many systems which crackers break
  405. into are only used as a means of entry into yet more systems; by hopping
  406. between many machines before breaking into a new one, the cracker hopes
  407. to confuse any possible pursuers and put them off the scent.  There is
  408. an advantage to be gained in breaking into as many different sites as
  409. possible, in order to "launder" your connections.
  410.  
  411. Another reason may be psychological: some people love to play with
  412. computers and stretch them to the limits of their capabilities.
  413.  
  414. Some crackers might think that it's "really neat" to hop over 6 Internet
  415. machines, 2 gateways and an X.25 network just to knock on the doors of
  416. some really famous company or institution (eg: NASA, CERN, AT+T, UCB).
  417. Think of it as inter-network sightseeing.
  418.  
  419. This view is certainly appealing to some crackers, and certainly leads
  420. to both the addiction and self-perpetuation of cracking.
  421.  
  422. As to the "How" of the question, this is again a very sketchy area.  In
  423. universities, it is extremely common for computer account to be passed
  424. back and forth between undergraduates:
  425.  
  426.   "Mary gives her account password to her boyfriend Bert at another
  427.   site, who has a friend Joe who "plays around on the networks".  Joe
  428.   finds other crackable accounts at Marys site, and passes them around
  429.   amongst his friends..." pretty soon, a whole society of crackers is
  430.   playing around on the machines that Mary uses.
  431.  
  432. This sort of thing happens all the time, and not just in universities.
  433. One solution is in education.  Do not let your users develop attitudes
  434. like this one:
  435.  
  436.        "It doesn't matter what password I use on _MY_ account,
  437.             after all, I only use it for laserprinting..."
  438.                 - an Aberystwyth Law student, 1991
  439.  
  440. Teach them that use of the computer is a group responsibility.  Make
  441. sure that they understand that a chain is only as strong as it's weak
  442. link.
  443.  
  444. Finally, when you're certain that they understand your problems as a
  445. systems manager and that they totally sympathise with you, configure
  446. your system in such a way that they can't possibly get it wrong.
  447.  
  448. Believe in user education, but don't trust to it alone.
  449.  
  450. Q.9 Who can I contact if I get broken into?
  451.  
  452. If you're connected to the Internet, you should certainly get in touch
  453. with CERT, the Computer Emergency Response Team.
  454.  
  455.     To quote the official blurb:
  456.  
  457. >From: Ed DeHart
  458. > The Computer Emergency Response Team (CERT) was formed by the Defense
  459. > Advanced Research Projects Agency (DARPA) in 1988 to serve as a focal
  460. > point for the computer security concerns of Internet users.  The
  461. > Coordination Center for the CERT is located at the Software Engineering
  462. > Institute, Carnegie Mellon University, Pittsburgh, PA.
  463.  
  464. > Internet E-mail: cert@cert.sei.cmu.edu
  465. > Telephone: 412-268-7090 24-hour hotline:
  466. >     CERT/CC personnel answer 7:30a.m. to 6:00p.m. EST(GMT-5)/EDT(GMT-4),
  467. >     and are on call for emergencies during other hours.
  468.  
  469. ...and also, the umbrella group "FIRST", which mediates between the
  470. incident handling teams themselves...
  471.  
  472. >From: John Wack <wack@csrc.ncsl.nist.gov>
  473. >[...] FIRST is actually a very viable and growing
  474. >organization, of which CERT is a member.  It's not actually true that,
  475. >if you're connected to the Internet, you should call CERT only - that
  476. >doesn't do justice to the many other response teams out there and in the
  477. >process of forming.
  478.  
  479. >NIST is currently the FIRST secretariat; we maintain an anonymous ftp
  480. >server with a directory of FIRST information (csrc.ncsl.nist.gov:
  481. >~/pub/first).  This directory contains a contact file that lists the
  482. >current members and their constituencies and contact information
  483. >(filename "first-contacts").
  484.  
  485. >While CERT is a great organization, other response teams who do handle
  486. >incidents on their parts of the Internet merit some mention as well -
  487. >perhaps mentioning the existence of this file would help to do that in a
  488. >limited space.
  489.  
  490. The file mentioned is a comprehensive listing of contact points per
  491. network for security incidents.  It is too large to reproduce here, I
  492. suggest that the reader obtains a copy for his/her self by the means
  493. given.
  494.  
  495. Q.10 What is a firewall?
  496.  
  497. A (Internet) firewall is a machine which is attached (usually) between
  498. your site and a wide area network.  It provides controllable filtering
  499. of network traffic, allowing restricted access to certain internet port
  500. numbers (ie: services that your machine would otherwise provide to the
  501. network as a whole) and blocks access to pretty well everything else.
  502. Similar machines are available for other network types, too.
  503.  
  504. Firewalls are an effective "all-or-nothing" approach to dealing with
  505. external access security, and they are becoming very popular, with the
  506. rise in Internet connectivity.
  507.  
  508. For more information on these sort of topics, see the Gateway paper by
  509. [Cheswick], below.
  510.  
  511. Q.11 Why shouldn't I use setuid shell scripts?
  512.  
  513. You shouldn't use them for a variety of reasons, mostly involving bugs
  514. in the Unix kernel.  Here are a few of the more well known problems,
  515. some of which are fixed on more recent operating systems.
  516.  
  517. 1) If the script begins "#!/bin/sh" and a link (symbolic or otherwise)
  518. can be made to it with the name "-i", a setuid shell can be immediately
  519. obtained because the script will be invoked: "#!/bin/sh -i", ie: an
  520. interactive shell.
  521.  
  522. 2) Many kernels suffer from a race condition which can allow you to
  523. exchange the shellscript for another executable of your choice between
  524. the times that the newly exec()ed process goes setuid, and when the
  525. command interpreter gets started up.  If you are persistent enough, in
  526. theory you could get the kernel to run any program you want.
  527.  
  528. 3) The IFS bug: the IFS shell variable contains a list of characters to
  529. be treated like whitespace by a shell when parsing command names.  By
  530. changing the IFS variable to contain the "/" character, the command
  531. "/bin/true" becomes "bin true".
  532.  
  533. All you need do is export the modified IFS variable, install a command
  534. called "bin" in your path, and run a setuid script which calls
  535. "/bin/true".  Then "bin" will be executed whilst setuid.
  536.  
  537. If you really must write scripts to be setuid, either
  538.  
  539.   a) Put a setuid wrapper in "C" around the script, being very careful
  540.   to reset IFS and PATH to something sensible before exec()ing the
  541.   script.  If your system has runtime linked libraries, consider the
  542.   values of the LD_LIBRARY_PATH also.
  543.  
  544.   b) Use a scripting language like Perl which has a safe setuid
  545.   facility, and is proactively rabid about security.
  546.  
  547. - but really, it's safest not to use setuid scripts at all.
  548.  
  549. Q.12 Why shouldn't I leave "root" permanently logged on the console?
  550.  
  551. Using a 'smart' terminal as console and leaving "/dev/console" world
  552. writable whilst "root" is logged in is a potential hole.  The terminal
  553. may be vulnerable to remote control via escape sequences, and can be
  554. used to 'type' things into the root shell.  The terminal type can
  555. usually be obtained via the "ps" command.
  556.  
  557. Various solutions to this can be devised, usually by giving the console
  558. owner and group-write access only , and then using the setgid mechanism
  559. on any program which has need to output to the console (eg: "write").
  560.  
  561. Q.13 Why shouldn't I create Unix accounts with null passwords?
  562.  
  563. Creating an unpassworded account to serve any purpose is potentially
  564. dangerous, not for any direct reason, but because it can give a cracker
  565. a toehold.
  566.  
  567. For example, on many systems you will find a unpassworded user "sync",
  568. which allows the sysman to sync the disks without being logged in.  This
  569. appears to be both safe and innocuous.
  570.  
  571. The problem with this arises if your system is one of the many which
  572. doesn't do checks on a user before authorising them for (say) FTP.  A
  573. cracker might be able to connect to your machine for one of a variety of
  574. FTP methods, pretending to be user "sync" with no password, and then
  575. copy your password file off for remote cracking.
  576.  
  577. Although there are mechanisms to prevent this sort of thing happening in
  578. most modern vesions of Unix, to be totally secure requires an in-depth
  579. knowledge of every package on your system, and how it deals with the
  580. verification of users.  If you can't be sure, it's probably better not
  581. to leave holes like this around.
  582.  
  583. Another hole that having null-password accounts opens up is the
  584. possibility (on systems with runtime linked libraries) of spoofing
  585. system software into running your programs as the "sync" user, by
  586. changing the LD_LIBRARY_PATH variable to a library of your own devising,
  587. and running "login -p" or "su" to turn into that user.
  588.  
  589. Q.14 What security holes are associated with X-windows (and other WMs)?
  590.  
  591. Lots, some which affect use of X only, and some which impact the
  592. security of the entire host system.
  593.  
  594. I would prefer not to go into too much detail here, and would refer any
  595. reader reader looking for detailed information to the other FAQ's in
  596. relevant newsgroups.  (comp.windows.*)
  597.  
  598. One point I will make is that X is one of those packages which often
  599. generates "Incompatible Usage" security problems, for instance the
  600. ability for crackers to run xsessions on hosts under accounts with no
  601. password (eg: sync), if it is improperly set up.  Read the question
  602. about unpassworded accounts in this FAQ.
  603.  
  604. Q.15 What security holes are associated with NFS?
  605.  
  606. Lots, mostly to do with who you export your disks to, and how.  The
  607. security of NFS relies heavily upon who is allowed to mount the files
  608. that a server exports, and whether they are exported read only or not.
  609.  
  610. The exact format for specifying which hosts can mount an exported
  611. directory varies between Unix implementations, but generally the
  612. information is contained within the file "/etc/exports".
  613.  
  614. This file contains a list of directories and for each one, it has a
  615. series of either specific "hosts" or "netgroups" which are allowed to
  616. NFS mount that directory.  This list is called the "access list".
  617.  
  618. The "hosts" are individual machines, whilst "netgroups" are combinations
  619. of hosts and usernames specified in "/etc/netgroup".  These are meant to
  620. provide a method of finetuning access.  Read the relevant manual page
  621. for more information about netgroups.
  622.  
  623. The exports file also contains information about whether the directory
  624. is to be exported as read-only, read-write, and whether super-user
  625. access is to be allowed from clients which mount that directory.
  626.  
  627. The important point to remember is that if the access list for a
  628. particular directory in /etc/exports contains:
  629.  
  630. 1) <nothing>
  631.  
  632. Your directory can be mounted by anyone, anywhere.
  633.